# _*_ coding: utf-8 _*_
from odoo import models, fields, api


class PurchaseRequisition(models.Model):
    _inherit = ["purchase.requisition", "stock.view.quant.mixin"]
    _name = "purchase.requisition"

    @api.multi
    def action_view_quants(self):
        self.ensure_one()
        products = self.line_ids.mapped("product_id")
        return self.action_view_quant_by_product_ids(products.ids)
